struct Tile {
    bool explored; // has the player already seen this tile ?
    Tile() : explored(false) {}
};
 
static const int ROOM_MAX_SIZE = 10;
static const int ROOM_MIN_SIZE = 5;
static const int MAX_ROOM_MONSTERS = 3;
static const int MAX_ROOM_ITEMS = 2;


class Map {
public :
    int width,height;
 
    Map(int width, int height);
    ~Map();
    bool isWall(int x, int y) const;
    bool isInMapBoundaries(int x, int y) const;
	bool isInFov(int x, int y) const;
    bool isExplored(int x, int y) const;
    bool canWalk(int x, int y) const;
    void computeFov();
    void render() const;
    void init(bool withActors);
    void addItem(int x, int y);
    virtual void generate(bool);
protected :
    friend class Door;
    Tile *tiles;
    TCODMap *map;
    TCODRandom *rng;
    long seed;

    void dig(int x1, int y1, int x2, int y2);
    void createRoom(bool first, int x1, int y1, int x2, int y2, bool);
    void addMonster(int x, int y);
};

class MapBsp : public Map
{

public:
    friend class BspListener;
    MapBsp(int width, int height);

    virtual void generate(bool);
};
